<!-- 1903010328 查询通行证 -->
<?php
$loginPath = "../login.html";
include "../inc/log/session.php";
?>
<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>成绩查询</title>
	<link rel="stylesheet" type="text/css" href="/28/inc/CSS/tScoreln.css">
	<link rel="stylesheet" type="text/css" href="/28/inc/CSS/reset.css">
	<script tpye="text/javascript" src="/28/inc/js/ajax1.js"></script>
  <script tpye="text/javascript" src="/28/inc/js/ajax2.js"></script>
  <script tpye="text/javascript" src="/28/inc/js/ajax3.js"></script>
</head>
<body>
	<div id="tScoreln">
		<!--顶部-->
			<div id="top">
			<img src="/28/inc/pic/00.png">
			<!--导航栏区域和下拉列表-->
			<div id="top-rig">
			<ul>
			    <li><a href="">首页</a></li>
			    <li id="ddown"><a href="" id="dropbtn">学校概况</a>
				    <div id="ddown-content">
				    <a href="">学校简介</a>
				    <a href="">历任教师</a>
				    </div>
				</li>
				<li id="ddown"><a href="" id="dropbtn">国际合作</a>
				    <div id="ddown-content">
				    <a href="">交流概况</a>
				    <a href="">国际学生</a>
				    </div>
				</li>
				<li id="ddown"><a href="" id="dropbtn">院系部门</a>
				    <div id="ddown-content">
				    <a href="">党群机构</a>
				    <a href="">管理与服务机构</a>
				    </div>
				</li>
				<li id="ddown"><a href="" id="dropbtn">科学研究</a>
				    <div id="ddown-content">
				    <a href="">科研概况</a>
				    <a href="">重点学科</a>
				    </div>
				</li>
				<li id="ddown"><a href="" id="dropbtn">教师队伍</a>
				    <div id="ddown-content">
				    <a href="">总体介绍</a>
				    <a href="">杰出人才</a>
				    </div>
				</li>
				<li id="ddown"><a href="" id="dropbtn">人才培养</a>
				    <div id="ddown-content">
				    <a href="">继续教育</a>
				    <a href="">奖贷学金</a>
				    </div>
				</li>
				<li id="ddown"><a href="" id="dropbtn">人才招聘</a>
				    <div id="ddown-content">
				    <a href="">优秀博士后</a>
				    <a href="">应聘方式</a>
				    </div>
				</li>
                <li id="ddown"><a href="" id="dropbtn">招生就业</a>
				    <div id="ddown-content">
				    <a href="">本科生招生</a>
				    <a href="">就业服务</a>
				    </div>
				</li>
				<img src="/28/inc/pic/find1.png">
		    </ul>
			</div>
			</div>
	    <!--顶部结束-->
	    <!---->
	    	<div id="main">
	        	<img src="/28/inc/pic/position.png">
	    		当前位置: 教师-成绩录入
	    	</div>
	    <!--结束-->
	    <div id="yh">
	    <img src="/28/inc/pic/user.png" style="width:25px;height:25px;margin:3px 10px;">
		<!-- 1903010328 动态信息 -->
		<h4 style="margin:3px 10px;font-size:20px;">您好！
		<?php
			echo <<<end
			{$_SESSION["name"]} |
			身份：{$_SESSION["sf"]} |
			学号/职工号：{$_SESSION["id"]} |  
			学院：{$_SESSION["xy"]} 
end;
		?>
		</h4>
	    </div>
	    <div id="SZ" >
	    <ul>
	    	<li id="d1"><a href="../index.php">首页</a></li>
	    	<li id="d1"><a href="/28/school/tScoreln.php">成绩录入</a></li>
	    	<li id="d1"><a href="scoreSearch.php">成绩查询</a></li>
	    	<li id="d1"><a herf="/28/school/tTask.php">教学任务查询</a></li>
	    	<li id="d1"><a herf="/28/school/user.php">用户设置</a></li>
	    	<li id="d1"><a herf="/28/school/me.php">上传头像</a></li>
	    	<li id="d1"><a href="../quit.php">注销</a></li>
	    	</ul>
	    </div>
		<!--结束-->
		<!-- 查询班级和教学id号 -->
<?php
    include "../inc/data/conn.php";
   	$sql_Te = "select teid,tename from mamx_teacher";
 	if($stmtTe = $conn->prepare($sql_Te))
   	{
     //第三步 1803010118 绑定结果，执行查询
     	$stmtTe->bind_result($teId,$teName);
     	$stmtTe->execute();
    //第四步 1803010118，保存结果记录集，读取结果数量，获取某条记录
    	$stmtTe->store_result();
   	}

//班级数据查询
//1903010328 第二步 编辑查询字符串
$sql = "select classname from mamx_class order by classname";
if($stmtCl = $conn->prepare($sql)) {
  //1903010328 绑定参数
  //1903010328 第三步 执行查询，绑定结果
  $stmtCl->execute();
  $stmtCl->bind_result($stuClass);
  //1903010328 保存结果集
  $stmtCl->store_result();
}

//学院数据查询
$sql_dep = "select depname from mamx_dep";
  if ($stmtDep = $conn->prepare($sql_dep))
  {
    // 第三步 1903010328
    $stmtDep->bind_result($depName);
    $stmtDep->execute();
    // 第四步 1903010328
    $stmtDep->store_result();
  }

//课程数据查询
$sql_cour = "select coname from mamx_course";
  if ($stmtCour = $conn->prepare($sql_cour))
  {
    // 第三步 1903010328
    $stmtCour->bind_result($cName);
    $stmtCour->execute();
    // 第四步 1903010328
    $stmtCour->store_result();
  }
  //课程类型查询
  $sql_coulist = "select cotype from mamx_course";
  if ($stmtCoulist = $conn->prepare($sql_coulist)) {
    $stmtCoulist->bind_result($cType);
    $stmtCoulist->execute();
    $stmtCoulist->store_result();
  }
  echo $str
?>
	    <!--表格区域-->
	<div id="">
 		<form action="" name="task">
			<table id="table2" width="1100px" >
				<tr>
					<td><b>查询条件</b></td>
				</tr>
  				<tr>
    			<td>学年: 
    			<select name="studyY" style="width:200px">
          <?php
        if (date("m")<7) {
          for ($i=(int)date("Y")-1;$i>=2002;$i--){
            $y=$i+1;
            $val=substr($i,-2).substr($y,-2);
          echo <<<END
                <option value="$val">$i-$y</option>
END;
        }
        }
        else{
          for ($i=(int)date("Y");$i>=2002;$i--){
            $y=$i+1;
            $val=substr($i,-2).substr($y,-2);
          echo <<<END
            <option value="$val">$i-$y</option>
END;
        }
        }
 ?>
        ?>
          </select>
       学期:
        <select name="term" id="">
            <option value="01">1</option>
            <option value="02">2</option>
        </select>
        
        系:
        <select name="depname" id="" onchange="DChange(document.task.depname.value)">
        <?php
                if($stmtDep->num_rows>0){
                  while($stmtDep->fetch()){
                    echo <<<END
                    <option value="$depName">$depName</option>
END;
                  }
                }
                ?>
              </select>   
        班级:
        <select name="stuclass" id="classCh" onchange="cCh(document.task.stuclass.value)" style="" >
        </select>
         <input type="button" value="查询" onclick="showScore1(document.task.studyY.value+document.task.term.value+document.task.stuclass.value);">
    </td>
  </tr>
    <tr>
        <td colspan="2"> 
            按教师查询>>课程：
        <select name="courseid" id="couCh">
        <input type="submit" value="查询">
        </select>          
        </td>
    </tr>
    <tr>
        <td colspan="2"> 
            课程类型：
        <select name="cotype" id="cInfo">
        <?php
                if ($stmtCoulist->num_rows>0) {
                  while($stmtCoulist->fetch()){
                    echo <<<END
                    <option value="$cType">$cType</option>
END;
                  };
                }
                else{
                  echo <<<END
                  <option value="">暂无记录</option>
END;
                }
                ?>
        </select>          
        </td>
    </tr>
    <tr>
        <td colspan="2"> 
            学号：
        <input type="text">
        <input type="button" value="模糊查询">         
        </td>
    </tr>
    <tr>
        <td colspan="2"> 
            姓名：
        <input type="text">
        <input type="button" value="模糊查询">  
        </td>
    </tr>
</table>

</form>
	    </div>
	    <!-- 查询信息显示区域 -->
	    <div id="showArea">

</div>
	</div>
	<!--底部区域-->
	<div id="footer">
		<img src="/28/inc/pic/footer.png">
		<p>哈尔滨市南岗区西大直街92号 查号台：+86-451-86412114 P.C.:150001 Copyright © 2020  哈尔滨工业大学网络与信息中心 黑ICP备05006863号</p>
	</div>
	<!--底部区域结束-->
</body>
</html>